﻿using Basic.FlowRemoteModel.FlowAppPower;
using Basic.FlowRemoteModel.FlowAppPower.Model;
using Basic.FlowService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.FlowService.RpcEvent
{
    internal class FlowAppPowerEvent : IRpcApiService
    {
        private readonly IFlowAppPowerService _Service;

        public FlowAppPowerEvent(IFlowAppPowerService service)
        {
            this._Service = service;
        }

        public void DeleteAppPower(DeleteAppPower obj)
        {
            this._Service.Delete(obj.Id);
        }


        public AppPowerDto GetAppPower(GetAppPower obj)
        {
            return this._Service.Get(obj.Id);
        }

        public void SetAppPower(SetAppPower obj)
        {
            this._Service.Save(obj.Power);
        }

    }
}
